at the beginning of 起初;开始; 在开始时; 在...伊始; 在的开始; 在、、、、、、初(指时间); 在初; 在…起始; 在…之初
beginning n. 1.初,当初;开始,端绪,发端;出发点。 2.本原,起源。 3.〔常 pl. 〕早期阶段。 4.起头部分。 at the beginning of the month 月初。 the beginning of a book 书的开头部分。 the beginnings of science 科学的摇蓝期。 rise from humble [modest] beginnings 出身微贱。 A misunderstanding was the beginning of their quarrel. 他们的争吵起因于彼此误解。 at the (very) beginning 在当初;首先。 from beginning to end 自始至终,始终;从头到尾。 In every beginning think of the end. 凡事都要想到它的后果。 in the beginning 当初,起初。 make a beginning 开一个头,动手。 the beginning of the end 事变的前兆,一叶落而知天下秋。
In the begin block , we initialize our integer variable 在begin块中,将整数变量
We used a begin block in the previous example 程序输出如下,这正是我们所期望的:
In pl 1 , a begin block or procedure block 1语言中的开始块或过程块。
For such situations , awk allows you to define a begin block 这意味着如果希望任何文本从新的一行开始,那么需要明确写入
We ll start off with the first line , the begin block and a function definition 我们将从第一行( begin块和函数定义)开始:
Begin blocks , for instance , will be executed first but can be specified many times throughout the program 例如, begin语句块会被首先执行,但它可以在程序中多次说明。
The remaining lines define our begin block , which gets executed before awk starts processing our checkbook file 其余行定义了begin块,在awk开始处理支票簿文件之前将执行这个代码块。
Because the begin block is evaluated before awk starts processing the input file , it s an excellent place to initialize the fs field separator variable , print a heading , or initialize other global variables that you ll reference later in the program Awk还有" do . while "循环,它在代码块结尾处对条件求值,而不象标准while循环那样在开始处求值。它类似于其它语言中的" repeat . until "循环。